/*****************************************************************
 *@Copyright all rights reserved ? 2014 Yuga
 *@author YUga studio
 *Contact: zengkang007@gmail.com
 *****************************************************************/
package com.oplink.webbase.modules.invoicing.entity;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import com.oplink.webbase.common.persistence.DataEntity;
import com.oplink.webbase.modules.sys.entity.User;

/**
 * 告警Entity
 * 
 * @author YUga studio
 * @version 2015-01-12
 */
@Entity
@Table(name = "invoicing_stock")
@DynamicInsert
@DynamicUpdate
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Stock extends DataEntity {

	private static final long serialVersionUID = 1L;
	private User user;
	private int sort; // ����
	private String stockFormId; // 库存单
	private String stockTime; // 库存时间
	private Long operatman; // 操作员

	public String getStockFormId() {
		return stockFormId;
	}

	public void setStockFormId(String stockFormId) {
		this.stockFormId = stockFormId;
	}

	public String getStockTime() {
		return stockTime;
	}

	public void setStockTime(String stockTime) {
		this.stockTime = stockTime;
	}

	public Long getOperatman() {
		return operatman;
	}

	public void setOperatman(Long operatman) {
		this.operatman = operatman;
	}

	// JPA ����USER_ID�еĶ��һ��ϵ����
	@ManyToOne
	@JoinColumn(name = "user_id")
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@Transient
	public int getSort() {
		return sort;
	}

	public void setSort(int sort) {
		this.sort = sort;
	}
}
